.class Lcom/example/m6wmr/StartActivity$2;
.super Ljava/lang/Thread;
.source "StartActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/StartActivity;->getupdateconfig()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/StartActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/StartActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    .line 169
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 9

    .prologue
    .line 171
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 174
    new-instance v2, Landroid/os/Message;

    invoke-direct {v2}, Landroid/os/Message;-><init>()V

    .line 175
    .local v2, "msg":Landroid/os/Message;
    new-instance v6, Ljava/lang/StringBuilder;

    iget-object v7, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    iget-object v7, v7, Lcom/example/m6wmr/StartActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v7}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v7, "/index.php?ctrl=app&action=getnewconfig&datatype=json"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 176
    .local v4, "url":Ljava/lang/String;
    const-string v6, "StartActivity"

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "getShopSource \u83b7\u53d6\u5e97\u94fa\u6570\u636e"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 177
    iget-object v6, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    iget-object v6, v6, Lcom/example/m6wmr/StartActivity;->m:Lmyapp/MyApp;

    invoke-static {v4, v6}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v3

    .line 178
    .local v3, "str":Ljava/lang/String;
    const-string v6, "Startactivity"

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "getShopSource \u8fd4\u56de\u6570\u636e"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 180
    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 182
    .local v1, "json":Lorg/json/JSONObject;
    const-string v6, "error"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    const-string v7, "true"

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_0

    .line 183
    const-string v6, "msg"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 184
    const/4 v6, 0x1

    iput v6, v2, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 209
    :goto_0
    iget-object v6, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    iget-object v6, v6, Lcom/example/m6wmr/StartActivity;->h:Landroid/os/Handler;

    invoke-virtual {v6, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 213
    .end local v1    # "json":Lorg/json/JSONObject;
    :goto_1
    return-void

    .line 186
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_0
    :try_start_1
    const-string v6, "msg"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 187
    const/4 v6, 0x1

    iput v6, v2, Landroid/os/Message;->arg1:I
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    .line 204
    .end local v1    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 205
    .local v0, "e":Lorg/json/JSONException;
    :try_start_2
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 206
    const/4 v6, 0x3

    iput v6, v2, Landroid/os/Message;->arg1:I
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 209
    iget-object v6, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    iget-object v6, v6, Lcom/example/m6wmr/StartActivity;->h:Landroid/os/Handler;

    invoke-virtual {v6, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_1

    .line 189
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v1    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_3
    const-string v6, "msg"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    .line 190
    const-string v6, "Startactivity"

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "getShopSource \u8fd4\u56de\u6570\u636e"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v8, "APPindex"

    invoke-virtual {v1, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v6, v7}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 192
    iget-object v6, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    const-string v7, "Appset"

    const/4 v8, 0x0

    invoke-virtual {v6, v7, v8}, Lcom/example/m6wmr/StartActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v5

    .line 193
    .local v5, "userInfo":Landroid/content/SharedPreferences;
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "APPindex"

    const-string v8, "APPindex"

    invoke-virtual {v1, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 194
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "apppayacount"

    const-string v8, "apppayacount"

    invoke-virtual {v1, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 195
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "apppayonline"

    const-string v8, "apppayonline"

    invoke-virtual {v1, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 196
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "appdataver"

    const-string v8, "appdataver"

    invoke-virtual {v1, v8}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 197
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v7

    const-string v8, "mobilemodule"

    const-string v6, "mobilemodule"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_2

    const-string v6, ""

    :goto_2
    invoke-interface {v7, v8, v6}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 199
    const-string v6, "appdataver"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v2, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 200
    const/4 v6, 0x2

    iput v6, v2, Landroid/os/Message;->arg1:I
    :try_end_3
    .catch Lorg/json/JSONException; {:try_start_3 .. :try_end_3} :catch_0
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    goto/16 :goto_0

    .line 208
    .end local v1    # "json":Lorg/json/JSONObject;
    .end local v5    # "userInfo":Landroid/content/SharedPreferences;
    :catchall_0
    move-exception v6

    .line 209
    iget-object v7, p0, Lcom/example/m6wmr/StartActivity$2;->this$0:Lcom/example/m6wmr/StartActivity;

    iget-object v7, v7, Lcom/example/m6wmr/StartActivity;->h:Landroid/os/Handler;

    invoke-virtual {v7, v2}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 211
    throw v6

    .line 197
    .restart local v1    # "json":Lorg/json/JSONObject;
    .restart local v5    # "userInfo":Landroid/content/SharedPreferences;
    :cond_2
    :try_start_4
    const-string v6, "mobilemodule"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
    :try_end_4
    .catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_0
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    move-result-object v6

    goto :goto_2
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 215
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 216
    monitor-exit p0

    return-void

    .line 215
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
